<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>${item.name }</title>
		<meta name="keywords" content="心理测试,心理测试题及答案,心理测试题,心理测试大全">
		<meta name="description"
			content="壹心理心理测试频道，这里有、性格测试、能力测试、会员测试、精选测试、专业测评，包含了心理测试题及答案。">
		<%@ include file="/common/include/title.jsp" %>
		<script type="text/javascript">
			$(function(){
				/*为每个单选框增加单击事件*/
				$(".items").click(function(){
					/*单击切换问题*/
					questionSwitch();
				});
				
			});
			/*
				切换问题
				将当前的问题隐藏,将下一个问题显示
			*/
			var count = 1;
			var preFlag = "0";
			function questionSwitch()
			{
				/*所有问题的长度*/
				var totalSize = $(".test_contents").length;
				if(count == 0 && preFlag == "0"){
					$("#id_pre_link").hide();
				}else{
					$("#id_pre_link").show();
					preFlag = "1";
				}
				if( count == 0){
					count = 1;
				}
				/*表示做完了所有题目
					jquery数组下标从0开始
				*/
				if(count > totalSize-1){
					return ;
				}
				/*先隐藏所有问题*/
				$(".test_contents").hide();
				/*获取所有test_contents的底count元素*/
				$(".test_contents").eq(count).show();
				/*显示题号*/
				$("#id_cur_index").html(count+1);
				
				/*最后一个问题,显示隐藏的提交按钮*/
				if(count == totalSize-1){
					$("#id_show_result").show();
				}
				if(count < totalSize-1){
					count ++;
				}
			}
			/*上一题*/
			function questionPre(){
				if(count == 0){
					return;
				}
				count--;
				/*先隐藏所有问题*/
				$(".test_contents").hide();
				/*获取所有test_contents的底count元素*/
				$(".test_contents").eq(count).show();
				/*显示题号*/
				$("#id_cur_index").html(count+1);
			}
		</script>
	</head>
	<body>
		<jsp:include page="/head/header.htm"/>
		<div class="infos-wrap">
			<div class="fish-left main-left">
				<div class="mbox tshow_index">
					<div class="title bor_bot fixed">
						<p class="items fl" title="心理测试"></p>
						<div class="tinfo fl">
							<h2>${item.name }</h2>
							<span class="icons" title="测试人数"></span>${item.testedNum }人测试过 &nbsp; 
							<span class="icons fav" title="收藏次数"></span>${item.favNum }次收藏 &nbsp; 
							<span class="icons tdates" title="发布时间"></span>2017-01-25 10:00:00&nbsp; 
							<span class="icons comments" title="评论数"></span>${item.suggNum }条评论
						</div>
					</div>
					<div class="ctest bor_top">
						当前第 <span class="fgreen fb" id="id_cur_index"></span> &nbsp;题 <span
							class="total">本测试共 <span class="fgreen fb">${item.questionNum }</span> &nbsp;题
						</span>
					</div>
				</div>
				<!--测试内容头部-->
		
				<form id="id_form" action=""
					method="post" onsubmit="return false">
					
					<c:forEach items="${item.questionList }" var="question" varStatus="stat">
						<div class="test_contents" style="display: ${stat.count == '1' ? '' : 'none'}" >
							<p class="descs fb">${stat.count }. ${question.name }</p>
							<div class="sels_list">
								<!--单选测试-->
								<c:forEach items="${question.answerList }" var="answer" varStatus="stats">
									<div class="items">
										<p class="i_top"></p>
										<p class="i_mid">
											<span class="sels"> 
											<input id="ans_${answer.id }" name="question-1" value="66511" question="25815" qid="25826" rid="0" type="radio">
											</span>
											<lable for="ans_${answer.id }">${answer.name }</lable>
										</p>
										<p class="i_bot"></p>
									</div>
								</c:forEach>
								
							</div>
						</div>
						
					</c:forEach>
					
					<input name="choice" id="id_choice" type="hidden">
					<p class="tbtns">
						<a id="id_pre_link" style="" href="javascript:void(0)" class="test_btn" onclick="return questionPre()">上一题
						</a> 
						&nbsp;&nbsp; 
						<input id="id_show_result" style="display: none" class="btns" value="提 交" type="submit">
					</p>
				</form>
				<!--测试内容-->
			</div>
			<!--left-->
			<div class="fish-left main-right">
				<div class="multi_ads fixed">
					<div class="mt">
						<strong>编辑推荐<span class="mq">：</span><span class="ms">······
						</span></strong>
					</div>
					<dl>
						<dd>
							<a href="http://www.xinli001.com/info/100360756?from=cheshi"
								title="心探社" target="_blank"> <img
								src="http://ossimg.xinli001.com/20161219/22c35b0aef597efe978b7a084dcf3030.jpg"
								hover="true" title="心探社" alt="心探社" height="135" width="135">
							</a>
						</dd>
			
						<dd>
							<a href="http://www.xinli001.com/ceshi/99897526?from=2017"
								title="心理需求测评" target="_blank"> <img
								src="http://image.xinli001.com/20160805/030954q4tnzb0jb0nyq06s.jpg"
								hover="true" title="心理需求测评" alt="心理需求测评" height="135" width="135">
							</a>
						</dd>
			
						<dt>
							<a href="http://www.xinli001.com/ceshi/99897572?from=ceshi"
								title="抑郁症测试" target="_blank"> <img
								src="http://ossimg.xinli001.com/20161024/16f19e49dab19387649e80eae35df090.jpg"
								hover="true" title="抑郁症测试" alt="抑郁症测试" height="135" width="280">
							</a>
						</dt>
						<br class="clear">
					</dl>
				</div>
				<!-- 1-->
				<div class="test_rmd_list fixed">
					<div class="st rbor">
						<span class="fb">${column.name }推荐 ：</span><span class="more"><a
							href="/ceshi">更多»</a></span>
					</div>
					<dl>
						<c:forEach items="${itemList }" var="item" varStatus="stat2" begin="0"
							end="4">
							<dd>
								<p class="pbox fl">
									<a href="${rootPath }/head/item/${item.id}.htm"> 
									 <img src="${item.imgPath }" hover="true" alt="${item.name }" height="60" width="90">
									</a>
								</p>
								<p class="tinfo fl">
									<a href="${rootPath }/head/item/${item.id}.htm">${item.name }wweqwwb</a>
									<span class="total">
									  <span class="icons" title="测试人数"></span>${item.testedNum }人测试过
									</span>
								</p>
							</dd>
						</c:forEach>
					</dl>
				</div>
				<div class="tags fixed">
					<div class="st rbor">
						<span class="fb">热门标签 ：</span>
					</div>
					<ul>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E6%80%A7%E6%A0%BC%E6%B5%8B%E8%AF%95">性格测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E7%88%B1%E6%83%85%E6%B5%8B%E8%AF%95">爱情测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E8%83%BD%E5%8A%9B%E6%B5%8B%E8%AF%95">能力测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E5%BF%83%E7%90%86%E6%B5%8B%E8%AF%95">心理测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E8%B6%A3%E5%91%B3%E6%B5%8B%E8%AF%95">趣味测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E4%B8%93%E4%B8%9A%E6%B5%8B%E8%AF%95">专业测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E5%A7%BB%E7%BC%98%E6%B5%8B%E8%AF%95">姻缘测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E6%B5%8B%E8%AF%95%E7%88%B1%E6%83%85">测试爱情</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E8%81%8C%E4%B8%9A%E6%B5%8B%E8%AF%95">职业测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E9%A2%84%E8%A8%80%E6%B5%8B%E8%AF%95">预言测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E4%BC%9A%E5%91%98%E6%B5%8B%E8%AF%95">会员测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E7%88%B1%E6%83%85">爱情</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E7%BF%BB%E8%AF%91%E6%B5%8B%E8%AF%95">翻译测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E4%B8%93%E4%B8%9A%E9%87%8F%E8%A1%A8">专业量表</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E6%BD%9C%E6%84%8F%E8%AF%86%E6%B5%8B%E8%AF%95">潜意识测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E5%A4%96%E5%9B%BD%E6%B5%8B%E8%AF%95">外国测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E6%80%A7%E6%A0%BC">性格</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E8%81%8C%E5%9C%BA%E6%B5%8B%E8%AF%95">职场测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E5%81%A5%E5%BA%B7%E6%B5%8B%E8%AF%95">健康测试</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E5%BF%83%E7%90%86%E5%81%A5%E5%BA%B7">心理健康</a></li>
						<li class="fl"><a
							href="http://www.xinli001.com/ceshi/tag?name=%E6%81%8B%E7%88%B1">恋爱</a></li>
					</ul>
				</div>
				<!--标签-->
			</div>
			<!--right-->
		</div>
		<%@ include file="/common/include/footer.jsp" %>
	</body>
</html>